<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('record_data_columns', function (Blueprint $table) {
            $table->id();

            $table->unsignedInteger('platform_type_id')->comment('平台类型id');
            $table->string('custom_column1')->nullable()->comment('自定义字段1');
            $table->string('custom_column2')->nullable()->comment('自定义字段2');
            $table->string('custom_column3')->nullable()->comment('自定义字段3');
            $table->string('custom_column4')->nullable()->comment('自定义字段4');
            $table->string('custom_column5')->nullable()->comment('自定义字段5');
            $table->string('custom_column6')->nullable()->comment('自定义字段6');
            $table->string('custom_column7')->nullable()->comment('自定义字段7');
            $table->string('custom_column8')->nullable()->comment('自定义字段8');
            $table->string('custom_column9')->nullable()->comment('自定义字段9');
            $table->string('custom_column10')->nullable()->comment('自定义字段10');
            $table->string('custom_column11')->nullable()->comment('自定义字段11');
            $table->string('custom_column12')->nullable()->comment('自定义字段12');
            $table->string('custom_column13')->nullable()->comment('自定义字段13');
            $table->string('custom_column14')->nullable()->comment('自定义字段14');
            $table->string('custom_column15')->nullable()->comment('自定义字段15');
            $table->string('custom_column16')->nullable()->comment('自定义字段16');
            $table->string('custom_column17')->nullable()->comment('自定义字段17');
            $table->string('custom_column18')->nullable()->comment('自定义字段18');
            $table->string('custom_column19')->nullable()->comment('自定义字段19');
            $table->string('custom_column20')->nullable()->comment('自定义字段20');

            $table->timestamps();
        });

        \DB::statement("ALTER TABLE `record_data_columns` comment '数据登记自定义字段表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('record_data_columns');
    }
};
